package org.richfaces;
import java.io.IOException;
import java.io.OutputStream;

import org.richfaces.datahelper.SessionDataHelper;

public class GraphBean {
	public void paint(OutputStream out, Object data) throws IOException {
	    Object restoredData = SessionDataHelper.getDataByKey(data);

		//render image from stored bytes
		byte[] pictureData = ((Data) restoredData).getPictureData();
		out.write(pictureData);
	}
}
